Hi,
The issue is being synced over iCloud regardless of the server involved.
On the Mac that should be as simple as going to System Preferences > iCloud and enabling the Contacts option.
The Same needs to be done on the iPhone using the same Apple ID.
The Messages app then needs to be using the same Apple ID.
This has to be an iCloud one but does Not have to be the same one used to sync the Contacts - it just has to be the same on the Mac and iPhone version of Messages.
If on the Mac in System Preferences > Internet accounts other services are also set to the sync Contacts List then you can have problems.
Disable them either in Contacts > Preferences > Accounts or in the System Preferences > Internet Accounts for each active account that is using Contacts to sync.

9:07 pm Sunday; May 15, 2016
iMac 2.5Ghz i5 2011 (El Capitan)
G4/1GhzDual MDD (Leopard 10.5.8)
MacBookPro 2Gb (Snow Leopard 10.6.8)
Mac OS X (10.6.8),
iPhone and an iPad (2)